import 'package:riki_base_flutter/router/index.dart';
import 'package:riki_login/entity/login_arg.dart';
import 'package:riki_login/pages/staff/staff_login_code_page.dart';
import 'package:riki_login/pages/staff/staff_login_password_page.dart';
import 'package:riki_login/pages/staff/staff_register_housekeeper_page.dart';
import 'package:riki_login/pages/staff/staff_register_worker_page.dart';
import 'package:riki_login/pages/user/user_login_code_page.dart';
import 'package:riki_login/pages/user/user_login_password_page.dart';

///作者：范玉辉
///创建时间：2021/8/16
///说明：
class RikiLoginRouter {
  /// 注册工人
  static const String staffRegisterWorkerPage = 'login/staffRegisterWorkerPage';

  /// 注册管家
  static const String staffRegisterHouseKeeperPage = 'login/staffRegisterHouseKeeperPage';

  /// staff 密码登录
  static const String staffLoginPassword = 'login/staffLoginPassword';

  /// staff 验证码登录
  static const String staffLoginCode = 'login/staffLoginCode';

  /// user 密码登录
  static const String userLoginPassword = 'login/userLoginPassword';

  /// user 验证码登录
  static const String userLoginCode = 'login/userLoginCode';

  /// 路由注册方法
  static void register() {
    RikiRouter.register(obtainRoutes());
  }

  static List<RouterDefine> obtainRoutes() {
    return [
      /// 工人注册页面
      RouterDefine(routeName: staffRegisterWorkerPage, handler: RouterHandler.standard(page: StaffRegisterWorkerPage())),

      /// 管家注册
      RouterDefine(routeName: staffRegisterHouseKeeperPage, handler: RouterHandler.standard(page: StaffRegisterHouseKeeperPage())),

      /// Staff 密码登录
      RouterDefine(routeName: staffLoginPassword, handler: RouterHandler.standard(page: StaffLoginPasswordPage())),

      /// Staff 验证码登录
      RouterDefine(routeName: staffLoginCode, handler: RouterHandler.standard(page: StaffLoginCodePage())),

      /// USer 密码登录
      RouterDefine(routeName: userLoginPassword, handler: RouterHandler.standard(page: UserLoginPasswordPage())),

      /// User验证码登录
      RouterDefine(routeName: userLoginCode, handler: RouterHandler.standard(page: UserLoginCodePage())),
    ];
  }
}
